package com.zbl.zblproject.core.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zbl.zblproject.core.entity.RechargeLog;
import com.zbl.zblproject.core.entity.Supplier;

import java.util.List;

/**
 * @author youlanqiang
 * @version 1.0
 * @date 2018/10/12
 */
public interface SupplierService {

    /**
     * 查询类表
     * @param current 第几页
     * @param size   几项
     * @return
     */
    IPage<Supplier> erpSupperList(int current, int size);


    /**
     * 删除集合中ID的供应商
     * @param ids
     * @return
     */
    boolean  deleteSuppliers(List<Integer> ids);

    /**
     * 更新供应商
     * @param supplier
     * @return
     */
    boolean updateSupplier(Supplier supplier);

    /**
     * 添加供应商
     * @param supplier
     * @return
     */
    Supplier addSupplier(Supplier supplier);

    /**
     * 获取一个供应商
     * @param id 供应商的ID
     * @return
     */
    Supplier getOneById(int id);


    boolean recharge(int supplierId, int operatorId, double price);

    IPage<RechargeLog> logPage(int supplierId, int current, int size);
}
